<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'register.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<h1>注册</h1>
	<form action="<c:url value='/demo2/RegisterServlet'/>" method="post">
		用户名：<input type="text" name="username" value="${user.username }" />
		<font style="color: red;">${errors.username }${msg }</font><br /> 
		密&#12288码：<input type="password" name="password" value="${user.password }" />
		<font style="color: red;">${errors.password }</font><br />
		验证码：<input type="text" name="verifyCode" value="${user.verifyCode }" size="3"/>
		<img id="vCode" src='<c:url value="/demo2/VerifyCodeServlet"/>' border="1"/>
		<a href="javascript:;" onclick="_change();">看不清？换一张</a>
		<font style="color: red;">${errors.verifyCode }</font><br />
		<input type="submit" value="注册" /><br />
	</form>
	<script type="text/javascript">
		function _change() {
			var img = document.getElementById("vCode");			
			img.src = '<c:url value="/demo2/VerifyCodeServlet"/>?xxx='+new Date().getTime();
		}
	</script>
</body>
</html>
